Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement the IO methods required for input, and add Console.input. #11703

Merged
merged 3 commits into from
Mar 16, 2021

Conversation

stuhood
Copy link
Member

@stuhood stuhood commented Mar 16, 2021

Problem

The threadlocal implementation of sys.stdin added in #11536 did not expose enough methods to be used for input.

Solution

Implement the methods needed for input, and wrap for use buffered text consumption.

Result

Fixes #11398.

[ci skip-build-wheels]

src/python/pants/testutil/rule_runner.py Show resolved Hide resolved
src/python/pants/init/logging.py Outdated Show resolved Hide resolved
src/rust/engine/src/externs/stdio.rs Show resolved Hide resolved
# Building wheels and fs_util will be skipped. Delete if not intended.
[ci skip-build-wheels]
# Building wheels and fs_util will be skipped. Delete if not intended.
[ci skip-build-wheels]
Copy link
Contributor

@Eric-Arellano Eric-Arellano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wonderful!

@stuhood stuhood merged commit b6108b9 into pantsbuild:master Mar 16, 2021
@stuhood stuhood deleted the stuhood/threadlocal-input branch March 16, 2021 18:16
@benjyw benjyw mentioned this pull request Mar 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add an input method to Console
4 participants